<?php
// Загрузка классов «на лету»

function timestamp_($indate){
    list($year, $month, $day) = explode('-', $indate);
    $timestamp = mktime(0, 0, 0, $month, $day, $year);
    return $timestamp;
}

function __autoload($class_name){
	$filename 	= strtolower($class_name).'.php';
	$file 		= site_path.'classes'.DIRSEP.$filename;
	if(file_exists($file) == false){
		$file = site_path.'core'.DIRSEP.$filename;
		if(file_exists($file) == false){
			$file = site_path.'classes'.DIRSEP."doc".DIRSEP.$filename;
			if(file_exists($file) == false){
				return false;
			}
		}
	}
	require_once($file);
}
?>